package com.ls.thread;

import lombok.extern.slf4j.Slf4j;

/**
 * 线程六种状态测试
 */
public class ThreadDemo1 {

    public static void main(String[] args) {
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                System.out.println("thread run....");
            }
        };
        Thread thread1 = new Thread(runnable,"thread1");
        System.out.println(String.format("state{%s}",thread1.getState()));
        thread1.start();
        System.out.println(String.format("state{%s}",thread1.getState()));

        System.out.println(String.format("state{%s}",thread1.getState()));
    }



}
